package com.longer.demo.framework.druid;

import com.alibaba.druid.pool.DruidDataSource;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import javax.sql.DataSource;

/**
 * @program: demo
 * @description:
 * @author: SunBiaoLong
 * @create: 2019-01-08 14:26
 **/
//@Configuration
//用于扫描所有的servlet,filter,listener
//@ServletComponentScan
public class DruidConfig {
	/**
	 * 在下面的连接中登录---登录信息配置在
	 * @see com.longer.demo.framework.druid.DruidStatViewServlet
	 * <a href="http://localhost:8090/longer/druid/login.html"/>
	 *
	 * @return
	 */
//	@Bean
//	@ConfigurationProperties(prefix="spring.datasource.druid")
	public DataSource druidDataSource(){
		return new DruidDataSource();
	}
}
